<section class="bg-white dark:bg-gray-900 min-h-[90vh]">
    <div class="container px-6 py-10 mx-auto">
        <div class="flex justify-between items-center mb-6">
            <h1 class="text-2xl font-semibold text-gray-800 capitalize lg:text-3xl dark:text-white">团队项目管理</h1>
            <button
                type="button"
                {{on "click" this.logout}}
                class="px-4 py-2 text-sm font-medium text-white bg-red-600 rounded-md hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
            >
                退出登录
            </button>
        </div>

        <div class="border-b border-gray-200 dark:border-gray-700 mb-6">
            <nav class="flex space-x-8">
                {{#each this.tabs as |tab|}}
                    <button
                        type="button"
                        {{on "click" (fn this.switchTab tab.id)}}
                        class="py-4 px-1 border-b-2 font-medium text-sm {{if (eq this.activeTab tab.id) 'border-blue-500 text-blue-600 dark:text-blue-400' 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 dark:text-gray-400 dark:hover:text-gray-300'}}"
                    >
                        {{tab.name}}
                    </button>
                {{/each}}
            </nav>
        </div>

        <div class="mt-6">
            {{#if (eq this.activeTab 'gantt')}}
                <TeamProject::GanttChart
                    @participants={{this.allParticipants}}
                    @members={{this.members}}
                    @hiddenDates={{this.hiddenDates}}
                    @requirements={{this.requirements}}
                />
            {{else if (eq this.activeTab 'requirements')}}
                <TeamProject::RequirementsList
                    @requirements={{this.requirements}}
                    @members={{this.members}}
                    @onUpdateRequirement={{this.updateRequirement}}
                    @onAddRequirement={{this.addRequirement}}
                    @onDeleteRequirement={{this.deleteRequirement}}
                />
            {{else if (eq this.activeTab 'participants')}}
                <TeamProject::ParticipantsList
                    @requirements={{this.requirements}}
                    @filteredParticipants={{this.filteredParticipants}}
                    @members={{this.members}}
                    @onUpdateParticipant={{this.updateParticipant}}
                    @onAddParticipant={{this.addParticipant}}
                    @onDeleteParticipant={{this.deleteParticipant}}
                    @onRefresh={{this.refreshData}}
                />
            {{else if (eq this.activeTab 'members')}}
                <TeamProject::MemberList 
                    @members={{this.members}}
                    @onUpdateMember={{this.updateMember}}
                    @onAddMember={{this.addMember}}
                    @onDeleteMember={{this.deleteMember}}
                />
            {{/if}}
        </div>
    </div>
</section>
